package com.ruoyi.liangshi.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Map;

/**
 * 门店营业收银订单信息对象 biz_bs_order
 *
 * @author ruoyi
 * @date 2024-01-06
 */
@Data
@TableName("biz_bs_order")
public class BsOrder implements Serializable {
    private static final long serialVersionUID = 1L;

        /**
         * 订单ID
         */
        @JsonSerialize(using = ToStringSerializer.class)
        private Long id;

        /**
         * 订单编码
         */
        @Excel(name = "订单编码")
        private String code;

        /**
         * 订单座位号
         */
        @Excel(name = "订单座位号")
        private Long pointId;

        /**
         * 开台时间
         */
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @Excel(name = "开台时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
        private Date openTime;

        /**
         * 开台的用户
         */
        @Excel(name = "开台的用户")
        private Long openShiftId;

        /**
         * 结算时间
         */
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @Excel(name = "结算时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
        private Date settleTime;

        /**
         * 结算用户
         */
        @Excel(name = "结算用户")
        private Long settleShiftId;

        /**
         * 结算的日期
         */
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @Excel(name = "结算的日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
        private Date settleBizDate;

        /**
         * 结算的月份
         */
        @Excel(name = "结算的月份")
        private String settleBizMonth;

        /**
         * 结算的POSID
         */
        @Excel(name = "结算的POSID")
        private Long settlePosId;

        /**
         * 用餐时长
         */
        @Excel(name = "用餐时长")
        private Long dinnerTime;

        /**
         * 服务员ID
         */
        @Excel(name = "服务员ID")
        private Long waiterId;

        /**
         *
         */
        @Excel(name = "")
        private Long salesmanId;

        /**
         *
         */
        @Excel(name = "")
        private BigDecimal deposit;

        /**
         * 应收金额
         */
        @Excel(name = "应收金额")
        private BigDecimal itemOrigMoney;

        /**
         * 赠送金额
         */
        @Excel(name = "赠送金额")
        private BigDecimal itemDiscMoney;

        /**
         * 最终收款金额
         */
        @Excel(name = "最终收款金额")
        private BigDecimal itemLastMoney;

        /**
         * 收款总金额
         */
        @Excel(name = "收款总金额")
        private BigDecimal itemLastTotal;

        /**
         * 收入金额
         */
        @Excel(name = "收入金额")
        private BigDecimal itemIncomeTotal;

        /**
         * 赠送金额
         */
        @Excel(name = "赠送金额")
        private BigDecimal discMoney;

        /**
         * 赠送原因
         */
        @Excel(name = "赠送原因")
        private String discInfo;

        /**
         * 打折金额
         */
        @Excel(name = "打折金额")
        private BigDecimal presentMoney;

        /**
         * 取消金额
         */
        @Excel(name = "取消金额")
        private BigDecimal cancelMoney;

        /**
         *
         */
        @Excel(name = "")
        private BigDecimal wipeMoney;

        /**
         *
         */
        @Excel(name = "")
        private BigDecimal notIncomeMoney;

        /**
         * 应收总额
         */
        @Excel(name = "应收总额")
        private BigDecimal origTotal;

        /**
         * 赠送总额
         */
        @Excel(name = "赠送总额")
        private BigDecimal discTotal;

        /**
         * 实际收款金额
         */
        @Excel(name = "实际收款金额")
        private BigDecimal lastTotal;

        /**
         * 门店ID
         */
        @Excel(name = "门店ID")
        private Long shopId;

        /**
         * 收入金额
         */
        @Excel(name = "收入金额")
        private BigDecimal incomeTotal;

        /**
         *
         */
        @Excel(name = "")
        private Long ssCount;

        /**
         * 菜品数量C类
         */
        @Excel(name = "菜品数量C类")
        private Integer bsKcCountC;

        /**
         * 菜品数量B类
         */
        @Excel(name = "菜品数量B类")
        private Integer bsKcCountB;

        /**
         * 菜品数量A类
         */
        @Excel(name = "菜品数量A类")
        private Integer bsKcCountA;

        /**
         * 菜品数量
         */
        @Excel(name = "菜品数量")
        private Integer bsKcCount;

        /**
         * 是否结算，1：结算  2:3；未结算
         */
        @Excel(name = "是否结算，1：结算  2:3；未结算")
        private Long state;

        /**
         * 订单的耗时单位秒，等于菜品的最大耗时
         */
        @Excel(name = "订单的耗时单位秒，等于菜品的最大耗时")
        private Long orderCallTime;

        /**
         * 是否以及计算了菜品的相关时间= max（各个菜品耗时）1：未计算 2：已经计算
         */
        @Excel(name = "是否以及计算了菜品的相关时间= max", readConverterExp = "各=个菜品耗时")
        private Long calcStatus;

        /**
         * 同步状态
         */
        @Excel(name = "同步状态")
        private String syncStatus;

        /**
         * bi表是否已同步(1:未同步,2:已同步)
         */
        @Excel(name = "bi表是否已同步(1:未同步,2:已同步)")
        private String isBiSync;

        @TableField(exist = false)
        private String pointName;


        @TableField(exist = false)
        private Map<String, BigDecimal> atchTypeMaps;
    @TableField(exist = false)
        private Long createShopId;
    @TableField(exist = false)
        private String deptName;
        @Override
        public String toString() {
            return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId()).append("code", getCode()).append("pointId", getPointId()).append("openTime", getOpenTime()).append("openShiftId", getOpenShiftId()).append("settleTime", getSettleTime()).append("settleShiftId", getSettleShiftId()).append("settleBizDate", getSettleBizDate()).append("settleBizMonth", getSettleBizMonth()).append("settlePosId", getSettlePosId()).append("dinnerTime", getDinnerTime()).append("waiterId", getWaiterId()).append("salesmanId", getSalesmanId()).append("deposit", getDeposit()).append("itemOrigMoney", getItemOrigMoney()).append("itemDiscMoney", getItemDiscMoney()).append("itemLastMoney", getItemLastMoney()).append("itemLastTotal", getItemLastTotal()).append("itemIncomeTotal", getItemIncomeTotal()).append("discMoney", getDiscMoney()).append("discInfo", getDiscInfo()).append("presentMoney", getPresentMoney()).append("cancelMoney", getCancelMoney()).append("wipeMoney", getWipeMoney()).append("notIncomeMoney", getNotIncomeMoney()).append("origTotal", getOrigTotal()).append("discTotal", getDiscTotal()).append("lastTotal", getLastTotal()).append("shopId", getShopId()).append("incomeTotal", getIncomeTotal()).append("ssCount", getSsCount()).append("bsKcCount", getBsKcCount()).append("state", getState()).append("calcStatus", getCalcStatus()).append("syncStatus", getSyncStatus()).append("isBiSync", getIsBiSync()).append("orderCallTime", getOrderCallTime()).toString();
        }
    }
